package com.hsgene.shoppingcar.service.api;

import com.hsgene.common.util.result.ApiResult;
import com.hsgene.order.domain.applets.AppletsOrderPackageInfoDto;
import com.hsgene.shoppingcar.service.api.impl.CommodityServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @description:
 * @projectName: hdas-geneshop-server
 * @package: com.hsgene.order.service.api.impl
 * @author: maodi
 * @createDate: 2018/10/18 11:12
 * @version: 1.0
 * Copyright: Copyright (c) 2018
 */
@FeignClient(name = "ms-mod-product", path = "/v1.0/genetic/testing/commodities", fallback = CommodityServiceImpl.class)
public interface CommodityService {

    /**
     * @param userId 用户id
     * @param ids    商品id数组
     * @return com.hsgene.common.util.result.ApiResult<java.util.List<com.hsgene.order.domain.applets
     * .AppletsOrderPackageInfoDto>>
     * @description 根据商品id获取小程序订单商品信息
     * @author maodi
     * @createDate 2018/10/18 11:30
     */
    @GetMapping("order/packages/infos")
    ApiResult<List<AppletsOrderPackageInfoDto>> getAppletsOrderPackageInfoDtosByIds(@RequestParam("userId") String
                                                                                            userId, @RequestParam
                                                                                            ("ids") String[] ids);
}
